|
|
|
|
|
- Use conditions
- Deleting records in a Table or TreeView Table control based on a data file
- Referential integrity and Table or TreeView Table controls based on a data file
- Deleting records in a Table control based on a data file and Trigger
- Handling errors
- Locking the linked data file
- Deleting records in a Table control populated programmatically with a "Contains" filter
<Table>.Delete (Function) In french: <Table>.Supprime Deletes a row from: - a Table control,
- a TreeView Table control,
// Delete row #5 from the "TABLE_Product" control TABLE_Product.Delete(5)
// Delete all selected rows from a Table control // <Table>.DeleteSelect can also be used i is int NbSelection is int = TABLE_MyTable.SelectCount() FOR i = NbSelection TO 1 STEP -1 TABLE_MyTable.Delete(TABLE_MyTable.Select(i)) END
Syntax
<Table control>.Delete([<Subscript>])
<Table control>: Control name Name of the control to be used. This control can correspond to: - a Table control.
- a TreeView Table control.
<Subscript>: Optional integer Index of the row to delete. If this parameter is not specified, the selected rows are deleted. If this parameter is not specified and if no row is selected, <Table>.Delete has no effect. Remarks Use conditions <Table>.Delete can be used on: - a Table or TreeView Table control based on a data file.
- a Table or TreeView Table control populated programmatically.
- a single-selection or multi-selection control.
Reminder: Multi-selection is not available for Table controls in "Server" mode.
Deleting records in a Table or TreeView Table control based on a data file <Table>.Delete deletes the corresponding record from the data file associated with the control. If items are linked to other data files, no modification is automatically performed on these linked data files. Referential integrity and Table or TreeView Table controls based on a data file If an integrity error is detected, the row is not deleted and it remains visible in the control. Deleting records in a Table control based on a data file and Trigger You have the ability to activate a trigger when deleting a record from a Table control based on a data file. For more details, see the documentation about <Source>.DescribeTrigger. Handling errors The ErrorOccurred variable is set to True if the deletion fails. To get the details of the error, use ErrorInfo. Example of error cases: Attempt to delete a row whose index corresponds to a row not selected in the visible part of the Table control. Locking the linked data file If the data file is locked in the current process, <Table>.Delete deletes the specified row and unlocks the data file. Deleting records in a Table control populated programmatically with a "Contains" filter When used on a Table control populated programmatically with a "Contains" filter, <Table>.Delete displays the records that do not match the filter. The filters defined by the AAFs (Automatic Application Features) are canceled.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|